{% extends "base.html" %}

{% block title %}{{message}}{% endblock %}

{% block content %}
    <div class="msg msg-{{message.get_importance_display|lower}}">
        <h2><a href="{% url cron-by-host message.host %}">{{message.host}}</a>: {{message.subject}}</h2>
        <p class="date">{{message.date|date:"jS F Y g:ia"}}</p>
        {% if message.tags.count %}<p class="tags"><strong>Tags:</strong> {% for t in message.tags.all %}{% if not forloop.first %}, {% endif %}<a href="{{t.get_absolute_url}}">{{t}}</a>{% endfor %}</p>{% endif %}

        <div class="body">
            <pre>{{message.message}}</pre>
            {% include "cron/message-actions.html" %}
        </div>
    </div>

    {% for m in log %}
        <div class="msglog msglog-{{m.type}}">
            <span class="date">{{m.date|date:"d/m/Y g:ia"}}</span>
            {{m.comment}}
        </div>
    {% endfor %}
{% endblock %}
